package chapter2.No2_2_synchronized同步语句块.i静态同步方法与synchronized_class代码块.demo2;

/**
 * *：静态同步方法是给类加锁，同步方法(非静态)是给对象加锁
 *    所以，静态同步方法和同步方法(非静态)是可以异步
 * Created by Administrator on 2016/11/12.
 */
public class Main {
    public static void main(String[] args) {
        ServiceClass sc = new ServiceClass();
        ThreadA a = new ThreadA(sc);
        a.setName("a");
        ThreadB b = new ThreadB(sc);
        b.setName("b");
        ThreadC c = new ThreadC(sc);
        c.setName("c");

        a.start();
        b.start();
        c.start();
    }
}
